//
//  TTGoodsDetailInfoViewCell.m
//  ZTTeaching_Example
//
//  Created by apple on 2020/11/17.
//  Copyright © 2020 liuguang. All rights reserved.
//

#import "TTGoodsDetailInfoViewCell.h"

@interface TTGoodsDetailInfoViewCell ()

@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *contentLabel;

@end

@implementation TTGoodsDetailInfoViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        _titleLabel = [UILabel labelWithTitle:@"" color:UIColorHex(999999) fontSize:14];
        [self.contentView addSubview:_titleLabel];
        [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(20);
            make.centerY.equalTo(self.contentView);
        }];
        
        _contentLabel = [UILabel labelWithTitle:@"" color:UIColorHex(333333) fontSize:14];
        [self.contentView addSubview:_contentLabel];
        [_contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(130);
            make.centerY.equalTo(self.contentView);
        }];
        
        
    }
    
    return self;
}


- (void)setModel:(TTGoodsDetailInfoModel *)model
{
    _model = model;
    self.titleLabel.text = model.title;
    self.contentLabel.text = model.content ? : @"-";
    
    self.titleLabel.textColor = model.titleColor ? : UIColorHex(999999);
    self.contentLabel.textColor = model.contentColor ? : UIColorHex(333333);
    
    self.titleLabel.font = model.titleFont ? : [UIFont systemFontOfSize:14];
    self.contentLabel.font = model.contentFont ? : [UIFont systemFontOfSize:14];
    
}


@end
